﻿package com.athena.controller 
{
	import flash.display.*;
	import flash.events.*;
	import flash.text.*;
	import com.athena.vo.ObjectPlayer;
	
	public class PlayerController extends Sprite
	{
		private var _movie:MovieClip;
		
		public function PlayerController(_mc:MovieClip,_obj:ObjectPlayer)
		{
			_movie = _mc;
			_movie.name_txt.text = _obj.PlayerName;
			_movie.mark_txt.text = _obj.Mark;
			//addEventListener(MouseEvent.MOUSE_OVER, handleMouse);
			//addEventListener(MouseEvent.MOUSE_OUT, handleMouse);
		}
		
		private function handleMouse(event:MouseEvent):void
		{
			switch(event.type)
			{
				case MouseEvent.ROLL_OVER :
				_movie.gotoAndStop(2);
				break;
				case MouseEvent.ROLL_OUT :
				_movie.gotoAndStop(1);
				break;
				default :
				break;
			}
		}
	}
}